<!--包含头部文件-->
{include file="public/header" /}
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 评论管理 <span class="c-gray en">&gt;</span> 评论列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<form action="{:url('user/search')}" method="post">
		<div class="text-c"> 
			<input type="text" class="input-text" style="width:250px" placeholder="输入会员名称、电话、邮箱" id="" name="name">
			<button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
		</div>
	</form>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="r">共有数据：<strong></strong> 条</span> </div>
	<div class="mt-20">
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c">
				<th width="25"><input type="checkbox" name="" value=""></th>
				<th width="80">ID</th>
				<th width="60">用户ID</th>
				<th width="100">用户名</th>
				<th width="60">商品ID</th>
				<th width="">内容</th>
				<th width="130">评论时间</th>
				<th width="70">状态</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="comments" id="vo"}
			<tr class="text-c">
				<td><input type="checkbox" value="1" name=""></td>
				<td>{$vo.id}</td>
				<td>{$vo.uid}</td>
				<td>{$vo.uid|getUserById}</td>
				<td>{$vo.gid}</td>
				<td>{$vo.content}</td>
				<td>{$vo.create_time}</td>
				<td class="td-status">{$vo.status|plstatus}</td>
				<td class="td-manage screen"><a attr-id="{$vo.id}" style="text-decoration:none" href="javascript:;" title="屏蔽"><i class="Hui-iconfont">&#xe631;</i></a></td>
			</tr>
			{/volist}
		</tbody>
	</table>
	</div>
</div>
<!--包含头部文件-->
{include file="public/footer" /}
<script type="text/javascript">
$(function(){
	
	$('.screen a').click(function(){
		var id = $(this).attr('attr-id');
		var url = "{:url('comment/screen')}";
		var data = {'id':id};
		$.post(url,data,function(result){
			if (result.code ==1) {
				location.href = result.data;
			} else if(result.code ==0){
				alert(result.msg);
			}
		},'json')
	})
});

</script> 
</body>